<%--
  Created by IntelliJ IDEA.
  User: apple
  Date: 2020/6/19
  Time: 17:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<%@include file="head.jsp"%>
<body>



<!--广告图-->
<div class="container-fluid page-banner">
    <div class="row">
        <img src="img/pagebanner2.jpg" alt="" class="img-responsive" />
    </div>
</div>

<!--新闻列表 -->
<div class="news">
    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-3 col-sm-3 hidden-xs sidebar">
                <!--电脑端页面导航-->
                <ul>
                    <li class="sidebar-title">
                        <h3>多肉作品</h3>
                        <p>ARTICLES</p>
                    </li>
                    <li class="sidebar-item">
                        <a href="#"><span class="glyphicon glyphicon-play-circle"></span>&nbsp;&nbsp;我的作品</a>
                    </li>
                    <!--<li class="sidebar-item">
                        <a href=""><span class="glyphicon glyphicon-play-circle"></span>&nbsp;&nbsp;常见问题</a>
                    </li>-->
                </ul>
            </div>
            <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 right-content">
                <!--手机端页面导航-->
                <div class="mobile-nav hidden-md hidden-sm hidden-lg">
                    <div class="mobile-nav-title">
                        <h3>多肉作品</h3>
                        <p>ARTICLES</p>
                    </div>
                    <div class="mobile-nav-item clearfix">
                        <a href="#"><span class="glyphicon glyphicon-play-circle"></span>&nbsp;我的作品</a>
                        <!--<a href=""><span class="glyphicon glyphicon-play-circle"></span>&nbsp;&nbsp;常见问题</a>-->
                    </div>
                </div>
                <!--面包屑导航-->
                <ol class="breadcrumb bread">
                    <li>
                        <a href="index.jsp">首页</a>
                    </li>
                    <li class="active">我的作品</li>
                </ol>
                <div class="news-list">
                    <h4 class="content-title">我的作品 / <small>MY ARTICLES</small></h4>

                    <c:forEach items="${userpage.records}" var="n" varStatus="number">
                        <div class="row">
                            <div class="col-lg-4 col-md-4 col-sm-4 news-pic">
                                <img src="img/news-pic${number.index}.jpg" alt="" class="img-responsive center-block" />
                            </div>
                            <div class="col-lg-8 col-md-8 col-sm-8 news-text">
                                <h3><a href="/webtest/Homework/Qiantai/articles?action=page&id=${n.id}">${n.title}</a></h3>
                                <p>
                                    <a href="news-detail.jsp"></a>
                                </p>
                                <a href="/webtest/Homework/Qiantai/articles?action=page&id=${n.id}" class="readmore hidden-xs">阅读全文</a>
                                <div>

                                    <span class="pull-right"><i class="glyphicon glyphicon-time"></i> ${n.updatetime}</span>
                                </div>
                            </div>
                        </div>
                    </c:forEach>
                    <!--分页-->
                    <c:forEach items="${userpage.records}" var="n" begin="1" end="1">
                    <nav aria-label="Page navigation" class="page-box">
                        <ul class="pagination">
                            <li>
                                <a href="${pageContext.request.contextPath }/Homework/Qiantai/articles?action=mypage&currPage=1&writter=${n.writter}" aria-label="Previous">
                                    <span aria-hidden="true">首页</span>
                                </a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath }/Homework/Qiantai/articles?action=mypage&currPage=${userpage.currpage-1<=0?1:userpage.currpage-1}&writter=${n.writter}" aria-label="Previous">&laquo;</a>
                            </li>
                            <c:forEach begin="${userpage.currpage}" end="${userpage.totalpage}" var="num">
                                <li>
                                    <a href="${pageContext.request.contextPath }/Homework/Qiantai/articles?action=mypage&currPage=${num}&writter=${n.writter}">${num}</a>
                                </li>
                            </c:forEach>
                            <li>
                                <a href="${pageContext.request.contextPath }/Homework/Qiantai/articles?action=mypage&currPage=${userpage.currpage+1 <= userpage.totalpage?userpage.currpage+1:userpage.totalpage}&writter=${n.writter}" aria-label="Next">&raquo;</a>
                            </li>
                            <li>
                                <a href="${pageContext.request.contextPath }/Homework/Qiantai/articles?action=mypage&currPage=${userpage.totalpage}&writter=${n.writter}" aria-label="Next">
                                    <span aria-hidden="true">尾页</span>
                                </a>
                            </li>
                        </ul>
                        <ul> 第${userpage.currpage} 页 / 共${userpage.totalpage} 页</ul>
                    </nav>
                    </c:forEach>
                </div>
            </div>
        </div>
    </div>
</div>

<%@include file="foot.jsp"%>
<script src="js/jquery-1.11.0.js"></script>
<script src="js/bootstrap.min.js"></script>

</body>
</html>
